package blackjack;

import java.security.SecureRandom;

public class Card {

	int cardNum;
	int cardVal;
	int suitNum;
	String cardName;
	String suitName;
	String fullName;
	SecureRandom generator = new SecureRandom();

	//Constructor
	public Card(){
		cardNum = 1+generator.nextInt(13);
		suitNum = generator.nextInt(4);
				
		// Set cardName
		if (cardNum < 11) {
			cardName = Integer.toString(cardNum);
		};  
		switch (cardNum) {
		case 11: cardName = "Jack"; break; 
		case 12: cardName = "Queen"; break; 
		case 13: cardName = "King"; break; 
		case 1: cardName = "Ace"; break;
		};	
		
		// Set cardVal (Ace is 1)
		if (cardNum < 11) {
			cardVal = cardNum;
		};  
		switch (cardNum) {
		case 11: cardVal = 10; break; 
		case 12: cardVal = 10; break; 
		case 13: cardVal = 10; break; 
		};
		
		// Set suitName
		switch (suitNum) {
		case 0: suitName = "Diamonds"; break; 
		case 1: suitName = "Clubs"; break; 
		case 2: suitName = "Hearts"; break; 
		case 3: suitName = "Spades"; break;
		};	

		// Set fullName
		fullName = cardName+" of "+suitName;
	}
}
